<div class="form">

<?php $form=$this->beginWidget('bootstrap.widgets.TbActiveForm',array(
	'id'=>'creatives-form',
	'enableAjaxValidation'=>false,
)); ?>

	<?php echo $form->errorSummary($model); ?>
	
	<?php echo $form->hiddenField($model,'creator_id',array('value'=>Yii::app()->user->id));?>

	<div class="row">
		<?php echo $form->textFieldRow($model,'title',array('class'=>'span5','maxlength'=>45)); ?>
		<?php echo $form->error($model,'title'); ?>
	</div>
	<div class="row">
	   <?php 
	   // $this->widget('application.extensions.tinymce.ETinyMce',
			// array(
			// 'model'=>$model,
			// 'attribute'=>'description',
			// 'editorTemplate'=>'full',
			// 'plugins' => array ("jbimages,autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount,advlist,autosave"),
			// 'htmlOptions'=>array('rows'=>4, 'cols'=>30, 'class'=>'tinymce'),
			// 'options' => array(
									// 'theme_advanced_buttons1' =>
								   // 'undo,redo,|,bold,italic,underline,|,justifyleft,justifycenter,justifyright,justifyfull,|,outdent, indent,|,advhr,|,sub,sup,|,bullist,numlist,|,formatselect,fontselect,fontsizeselect,|,cut,copy,paste,pastetext,pasteword,|,search,replace,',
									// 'theme_advanced_buttons2' => 'tablecontrols,|,removeformat,visualaid,',
									// 'theme_advanced_buttons3'  =>  "jbimages,|,insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak,restoredraft",
									// 'theme_advanced_buttons4' => '',
									// 'theme_advanced_toolbar_location' => 'top',
									// 'theme_advanced_toolbar_align' => 'left',
									// 'theme_advanced_statusbar_location' => 'none',
									// 'theme_advanced_font_sizes' => "10=10pt,11=11pt,12=12pt,13=13pt,14=14pt,
																	// 15=15pt,16=16pt,17=17pt,18=18pt,19=19pt,20=20pt",
									// )
			// )); 
			?>
	</div>
	

	<div class="row">
		<?php echo $form->labelEx($model,'type'); ?>
		<?php echo $form->dropDownList($model,'type',CHtml::listData(CreaTypes::model()->findAll(array('order'=>'name')), 'id','name'),array('prompt'=>'Choose Type'));?>
		<?php echo $form->error($model,'type'); ?>
	</div>
	
	
	<div class="form-actions"> 
        <?php $this->widget('bootstrap.widgets.TbButton', array( 
            'buttonType'=>'submit', 
            'type'=>'primary', 
            'label'=>$model->isNewRecord ? 'Create' : 'Save', 
        )); ?>
    </div> 

<?php $this->endWidget(); ?>

</div><!-- form -->